#ifndef QLIB_COMPONENTDIALOG_H
#define QLIB_COMPONENTDIALOG_H

#include <QDialog>

QT_FORWARD_DECLARE_CLASS(QComboBox)
QT_FORWARD_DECLARE_CLASS(QDialogButtonBox)
QT_FORWARD_DECLARE_CLASS(QLineEdit)

class ComponentGeneral;
class LibraryModel;
class QedaLibrary;
class QedaComponent;

class ComponentDialog : public QDialog
{
    Q_OBJECT
public:
    explicit ComponentDialog(LibraryModel *libModel, QWidget *parent = 0);

    void setLibrary(QedaLibrary *lib);
    void setGroup(const QString &group);
    void setReference(const QString &reference);

    void dataFrom(QedaComponent *component);
    void dataTo(QedaComponent *component);

    QedaLibrary *library();

signals:
    
public slots:

private slots:
    void validate();

private:
    ComponentGeneral *m_general;

    QDialogButtonBox    *m_buttonBox;
};

#endif // QLIB_COMPONENTDIALOG_H
